home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1991 …esperately Seeking Seven / Desperately Seeking Seven.2mg / Dev.CD.8 / Essentials / Tools / DTS.Samples / SC24Teach / Teach.asm / Teach.asm < prev    next >
Encoding:
Assembly Source File  |  1990-05-25  |  2.0 KB  |  73 lines  |  [04] ASCII Text (0x0000)

  1. ***********************************************************************
  2. *
  3. * teach.aii -- Version 3.0  (Main Program)
  4. *
  5. * Copyright (c)
  6. * Apple Computer, Inc.  1986-1990
  7. * All Rights Reserved.
  8. *
  9. * Developer Technical Support Apple II Sample Code
  10. *
  11. * This file contains the teach program.
  12. *
  13. ***********************************************************************
  14.  
  15.                case on
  16.  
  17.                copy 2/ainclude/e16.types
  18.                copy teach.equ
  19.  
  20.                mcopy macros/teach.macros
  21.  
  22.                longi on
  23.                longa on
  24.  
  25. ***********************************************************************
  26.  
  27. main           start
  28.  
  29.                phb                      ;Save caller's data bank pointer.
  30.                phd                      ;Save caller's direct page pointer.
  31.                phk                      ;Switch data bank into program bank.
  32.                plb
  33.  
  34.                _TLStartUp               ;Start up Tool Locator & Memory Mgr.
  35.                pha                      ;Find out who we are.
  36.                _MMStartUp
  37.                pla
  38.                sta userID
  39.  
  40.                jsr initGlobals          ;Initialize our globals.
  41.  
  42.                pha                      ;Start up the tools using
  43.                pha                      ;resources.
  44.                PushWord userID
  45.                pea refIsResource
  46.                pea 1|-16                ;Resource ID.
  47.                pea 1
  48.                _StartupTools
  49.                PullLong initRef         ;Handle used by ShutdownTools.
  50.                bcs startFailed
  51.  
  52.                jsr setupMenus
  53.                jsr setupWindows
  54.                _InitCursor
  55.                jsr mainEvent
  56.  
  57. startFailed    pea refIsHandle          ;Now shut them all down.
  58.                PushLong initRef
  59.                _ShutdownTools
  60.  
  61.                pushword userID
  62.                _MMShutDown
  63.                _TLShutDown
  64.  
  65.                _QuitGS quitParms        ;Leave here.
  66.  
  67. initRef        dc i4'0'
  68. quitParms      dc i2'0'
  69.                dc i4'0'
  70.                dc i2'0'
  71.  
  72.                end
  73.